﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Com.ThrongIn.BE;
using Com.ThrongIn.BLL;

namespace ThrongIn
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                UserBLL ObjUser = new UserBLL();
                User user = ObjUser.GetUser(txtEmail.Text.Trim(), txtPassword.Text.Trim());
                if (user != null)
                {
                   // this.ClientScript.RegisterClientScriptBlock(this.GetType(), "success", "alert('Login Successfull');", true); 
                    Response.Redirect("Home.aspx");
                }
            }
        }
    }
}
